package com.service.infoEntry.dao;

import com.service.infoEntry.entity.TransactionInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TransactionInfoDao {
    void saveTransaction(TransactionInfo transactionInfo);

    void updateTransaction(TransactionInfo transactionInfo);

    TransactionInfo searchTransactionByNo(@Param("no") String no);

    /**
     * @param desc
     * @return
     */
    List<TransactionInfo> searchTransactionByDesc(String desc);

    List<TransactionInfo> queryOpenTransactionOfTeam(@Param("teamId") String teamId, @Param("userId") String userId, @Param("desc")String desc, @Param("status")Integer status, @Param("transactionStatus") Integer transactionStatus);

    List<String> queryAllNo(String teamId);

    List<TransactionInfo> queryTransactionByStatus(@Param("teamId") String teamId,@Param("userId") String userId,@Param("status") Integer status,@Param("transactionStatus") Integer transactionStatus);

    List<TransactionInfo> queryAllByDate();

    int deleteTransaction(String transactionNo);
}
